//buildChart({type:'Column3D',id:'chart',width:'600',height:'480',url:'',chart:{}});
var buildChart = function(opts) {
	opts = $.extend({},{type:'Column3D',width:'600',height:'480'},opts);
	var chart = new FusionCharts("statics/js/fusioncharts/" + opts.type + ".swf", "f_" + opts.id, opts.width, opts.height);
	$.ajax({url:opts.url,success:function(data){
		chart.setJSONData({"chart":opts.chart,"data":data});
		chart.render(opts.id);
	}});
	return chart;
};